# -*- coding: utf-8 -*-
from application import app

from flask_debugtoolbar import DebugToolbarExtension
#
# toolbar = DebugToolbarExtension(app)

'''
拦截器处理 和 错误处理器
'''
from interceptors.Auth import *
from interceptors.errorHandler import *

'''
蓝图
'''
from controllers.index import index_page
from controllers.member import member_page
from controllers.work import work_page
from controllers.meeting import meeting_page
from controllers.thing import thing_page
from controllers.seal import seal_page
from controllers.document import document_page
from controllers.mail import mail_page
from controllers.card import card_page
from controllers.eating import eating_page
from controllers.it import it_page
from controllers.study import study_page
from controllers.employ import employ_page
from controllers.car import car_page
from controllers.collect import collect_page


app.register_blueprint(index_page, url_prefix="/")
app.register_blueprint(member_page, url_prefix="/member")
app.register_blueprint(work_page, url_prefix="/work")
app.register_blueprint(meeting_page, url_prefix="/meeting")
app.register_blueprint(thing_page, url_prefix="/thing")
app.register_blueprint(seal_page, url_prefix="/seal")
app.register_blueprint(mail_page, url_prefix="/mail")
app.register_blueprint(card_page, url_prefix="/card")
app.register_blueprint(eating_page, url_prefix="/eating")
app.register_blueprint(document_page, url_prefix="/document")
app.register_blueprint(study_page, url_prefix="/study")
app.register_blueprint(it_page, url_prefix="/it")
app.register_blueprint(employ_page, url_prefix="/employ")
app.register_blueprint(car_page, url_prefix="/car")
app.register_blueprint(collect_page, url_prefix="/collect")

'''
模板函数
'''
from common.libs.UrlManager import UrlManager

app.add_template_global(UrlManager.buildStaticUrl, 'buildStaticUrl')
app.add_template_global(UrlManager.buildUrl, 'buildUrl')
